{% extends 'admin/common/base.html' %}
{% block content %}
<div class="admin-content">
    <div class="row">
        <div class="col-xs-12 col-sm-offset-2">
            <form method="post" role="form">
                {{ changePasswordForm.hidden_tag() }}
                <div class="col-xs-12 col-sm-8">
                    {% include 'admin/common/alert.html' %}<!-- flash提示 end -->
                    <!-- 错误信息changePasswordForm提示 -->
                    {% for field_name, field_errors in changePasswordForm.errors|dictsort if field_errors %}
                        {% for error in field_errors %}
                            <div class="error">
                                <div class="alert alert-danger alert-dismissible" role="alert" style="margin: 20px">
                                    <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                    <strong>{{ changePasswordForm[field_name].label }}错误：</strong> {{ error }}
                                </div>
                            </div>
                        {% endfor %}
                    {% endfor %}
                    <!-- 错误信息changePasswordForm提示 end -->
                    <div class="input-group">
                        <span class="input-group-addon" id="basic-addon1"><i class="glyphicon glyphicon-lock"></i> </span>
                        {{ changePasswordForm.old_password(class="form-control", placeholder="输入旧密码", required="", autofocus="") }}
                    </div>
                    <div class="input-group">
                        <span class="input-group-addon" id="basic-addon2"><i class="glyphicon glyphicon-lock"></i> </span>
                        {{ changePasswordForm.password(class="form-control", placeholder="输入新密码", required="") }}
                    </div>
                    <div class="input-group">
                        <span class="input-group-addon" id="basic-addon3"><i class="glyphicon glyphicon-lock"></i> </span>
                        {{ changePasswordForm.password2(class="form-control", placeholder="再次输入新密码", required="") }}
                    </div>
                    <div class="pull-right">
                        <input class="btn btn-default" type="reset" value="重 置">
                        {{ changePasswordForm.submit(class="btn btn-primary") }}
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
{% endblock %}